<?php

function api_get_uid_by_email($email) {
    return db_select('users', 'u')
                ->fields('u', array('uid'))
                ->condition('mail', $email)
                ->execute()
                ->fetchField();
}

function md_get_info_user( $uid ){
    $sql = "SELECT * FROM {tbnd_info_user} WHERE uid = $uid";
    $row = db_query( $sql)->fetchObject();
    return $row;
}